// Decompiled on 周六 2月 22 19:31:49 CST 2025 with Zomboid Decompiler v0.1.3 using Vineflower.
package zombie.text.templating;

import java.util.ArrayList;

public class ReplaceList implements IReplace {
    private final ArrayList<String> replacements;

    public ReplaceList() {
        this.replacements = new ArrayList();
    }

    public ReplaceList(ArrayList<String> _replacements) {
        this.replacements = _replacements;
    }

    protected ArrayList<String> getReplacements() {
        return this.replacements;
    }

    @Override
    public String getString() {
        return this.replacements.size() == 0 ? "!ERROR_EMPTY_LIST!" : (String)this.replacements.get(TemplateText.RandNext(this.replacements.size()));
    }
}
